import { http } from "/@/utils/http";
import CryptoJS from 'crypto-js'


/** 获取权限信息 */
export const getAuthInfoApi = () => {
  return http.request("get", "/api/auth/auth-info");
};

export const registrationApi = (data) => {
  const postData = {
    ...data,
    password: CryptoJS.MD5(data.password).toString().toLowerCase()
  }
  return http.request('post', '/api/auth/registration', { data: postData })
}

export const selectTenantApi = (data) => {
  const postData = {
    ...data,
    password: CryptoJS.MD5(data.password).toString().toLowerCase()
  }
  return http.request('post', '/api/auth/select-tenant', { data: postData })
}